package com.vkdasari.youtube.ui.action;

import java.awt.event.ActionEvent;

import javax.swing.Icon;

import org.apache.log4j.Logger;

import com.vkdasari.youtube.ui.MainPanel;

public class RemoveFileAction extends ZebraAction{
	
	private static final long serialVersionUID = 1L;
	
	private static final Logger log = Logger.getLogger(RemoveFileAction.class);

	public RemoveFileAction(String name, Icon icon){
		super(name, icon);
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		//MainPanel.getInstance().getUploadsTableModel().removeRows(MainPanel.getInstance().getUploadTable().getSelectedRows());
		if(MainPanel.getInstance().getUploadTable().getSelectedRow() >= 0){
			MainPanel.getInstance().getUploadsTableModel().removeRow(MainPanel.getInstance().getUploadTable().getSelectedRow());	
		}
		
	}

}
